package com.test.spring.fusion.service.impl;

import java.util.Date;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.test.spring.fusion.dao.UserRepository;
import com.test.spring.fusion.domain.User;
import com.test.spring.fusion.service.UserService;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserRepository userRepository;

	@Override
//	@LcnTransaction 使用aop配置
//	@Transactional
	public void saveLcnTest() {
		User user = new User();
		user.setId(UUID.randomUUID().toString());
		user.setCreateDate(new Date());
		userRepository.saveAndFlush(user);
	}

}
